local math_extended = {}

---@param x number
---@param min number
---@param max number
function math_extended.clamp(x, min, max)
    return (x < min and min) or (x > max and max) or x
end

---@generic T
---@param p0 T
---@param p1 T
---@param t T
function math_extended.lerp(p0, p1, t)
    return p0 + (p1 - p0) * t
end

return math_extended